<html>
<head>
    <meta charset="utf-8"/>
<meta name="description" content=""/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>

<title>常用API收集（第一期：2021.2.19） | 絷缘的博客</title>

<link rel="shortcut icon" href="https://zydnc.gitee.io/favicon.ico?v=1732378515642">

<link href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://zydnc.gitee.io/styles/main.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css">

<script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets/highlight.min.js"></script>
<script src="https://cdn.bootcss.com/highlight.js/9.15.10/languages/dockerfile.min.js"></script>
<script src="https://cdn.bootcss.com/highlight.js/9.15.10/languages/dart.min.js"></script>

<script src="https://cdn.jsdelivr.net/npm/moment@2.27.0/moment.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/js/bootstrap.min.js"></script>
<!-- DEMO JS -->
<!--<script src="media/scripts/index.js"></script>-->



    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.css">
 <script src='//unpkg.com/valine/dist/Valine.min.js'></script>
</head>
<body>
<div class="main gt-bg-theme-color-first">
    <nav class="navbar navbar-expand-lg">
    <div class="navbar-brand">
        <img class="user-avatar" src="/images/avatar.png" alt="头像">
        <div class="site-name gt-c-content-color-first">
            絷缘的博客
        </div>
    </div>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <i class="fas fa-bars gt-c-content-color-first" style="font-size: 18px"></i>
    </button>
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <div class="navbar-nav mr-auto" style="text-align: center">
            
                <div class="nav-item">
                    
                        <a href="/" class="menu gt-a-link">
                            首页
                        </a>
                    
                </div>
            
                <div class="nav-item">
                    
                        <a href="/archives" class="menu gt-a-link">
                            归档
                        </a>
                    
                </div>
            
                <div class="nav-item">
                    
                        <a href="/tags" class="menu gt-a-link">
                            标签
                        </a>
                    
                </div>
            
                <div class="nav-item">
                    
                        <a href="/about" class="menu gt-a-link">
                            关于
                        </a>
                    
                </div>
            
                <div class="nav-item">
                    
                        <a href="/friends" class="menu gt-a-link">
                            友链
                        </a>
                    
                </div>
            
        </div>
        <div style="text-align: center">
            <form id="gridea-search-form" style="position: relative" data-update="1732378515642" action="/search/index.html">
                <input class="search-input" autocomplete="off" spellcheck="false" name="q" placeholder="搜索文章" />
                <i class="fas fa-search gt-c-content-color-first" style="position: absolute; top: 9px; left: 10px;"></i>
            </form>
        </div>
    </div>
</nav>

    <div class="post-container">
        <div class="post-detail gt-bg-theme-color-second">
            <article class="gt-post-content">
                <h2 class="post-title">
                    常用API收集（第一期：2021.2.19）
                </h2>
                <div class="post-info">
                    <time class="post-time gt-c-content-color-first">
                        · 2021-02-19 ·
                    </time>
                    
                        <a href="https://zydnc.gitee.io/Ts0Iy_kql/" class="post-tags">
                            # API
                        </a>
                    
                        <a href="https://zydnc.gitee.io/85mF2tlWY2/" class="post-tags">
                            # 常用API收集
                        </a>
                    
                </div>
                <div class="post-content">
                    <h2 id="一-b站api">一、B站API</h2>
<h3 id="1-热门搜索api">1. 热门搜索API</h3>
<blockquote>
<p>https://s.search.bilibili.com/main/hotword?mid=&amp;buvid=034F9BB5-4350-41BB-90DC-24287F103A7D138368infoc&amp;jsonp=jsonp&amp;callback=jsonCallback_bili_66770627113836521</p>
</blockquote>
<h3 id="2-获取视频信息api">2. 获取视频信息API</h3>
<blockquote>
<p>https://api.bilibili.com/x/web-interface/archive/stat?bvid={视频BV号}</p>
<p>https://api.bilibili.com/x/player/pagelist?bvid={视频BV号}</p>
<p>https://api.bilibili.com/x/web-interface/view?aid={视频AV号}</p>
<p>https://api.bilibili.com/x/web-interface/view?bvid={视频BV号}</p>
<p>https://api.bilibili.com/x/web-interface/view?cid={视频cid}</p>
</blockquote>
<blockquote>
<p>上述多个接口既可以获取视频详细信息，也可以获取视频简单信息，具体哪个是哪个，我忘记了，请读者带入参数自行测试</p>
</blockquote>
<h3 id="3-获取弹幕api">3. 获取弹幕API</h3>
<blockquote>
<p>https://comment.bilibili.com/{cid}.xml</p>
</blockquote>
<blockquote>
<p>将视频的cid与此url拼接，发送get请求，即可获取该视频弹幕信息</p>
</blockquote>
<h3 id="4-获取视频cidapi">4. 获取视频cidAPI</h3>
<blockquote>
<p>https://api.bilibili.com/x/player/pagelist?bvid={BV号}</p>
</blockquote>
<h3 id="5-b站每日排行榜api">5. B站每日排行榜API</h3>
<blockquote>
<p>https://api.bilibili.com/x/web-interface/ranking/v2?rid=0&amp;type=all</p>
</blockquote>
<h3 id="6-b站入站必刷榜单api">6. B站入站必刷榜单API</h3>
<blockquote>
<p>https://api.bilibili.com/x/web-interface/popular/precious?page_size=100&amp;page=1</p>
</blockquote>
<h3 id="7-b站每周必看api">7. B站每周必看API</h3>
<blockquote>
<p>https://api.bilibili.com/x/web-interface/popular/series/one?number={期数}</p>
</blockquote>
<blockquote>
<p>期数从1开始，具体哪一期，请参考B站上的期数获取指定信息，截止到2021.2.19已更新到99期</p>
</blockquote>
<h3 id="8-b站小黑屋api">8. B站小黑屋API</h3>
<blockquote>
<p>https://api.bilibili.com/x/credit/blocked/list?jsonp=jsonp&amp;otype=0&amp;pn={页数}&amp;ps=20&amp;callback=__jp0</p>
</blockquote>
<blockquote>
<p>因为B站一次性展示内容只有10条左右，会根据滚动条动态发送ajax请求加载数据，所以需要每次提供加载的页数，就可加载到对应资源<br>
其他参数没做研究，但猜测大致是<code>来源</code>和<code>类型</code>，请读者自行获取相关信息</p>
</blockquote>
<h2 id="二-知乎api">二、 知乎API</h2>
<h3 id="1-知乎每日热榜api">1. 知乎每日热榜API</h3>
<blockquote>
<p>https://www.zhihu.com/api/v3/feed/topstory/hot-lists/total?limit=50&amp;desktop=true</p>
</blockquote>
<blockquote>
<p>原文作者：絷缘<br>
作者邮箱：zhiyuandnc666@88.com<br>
原文地址：<a href="https://zhiyuandnc.github.io/IW8mQ0Bvy/">https://zhiyuandnc.github.io/IW8mQ0Bvy/</a><br>
版权声明：本文为博主原创文章，转载请注明原文链接作者信息</p>
</blockquote>

                </div>
            </article>
        </div>

        
            <div class="next-post">
                <div class="next gt-c-content-color-first">下一篇</div>
                <a href="https://zydnc.gitee.io/wN4eqwrOE/" class="post-title gt-a-link">
                    数组模拟实现循环队列
                </a>
            </div>
        

        

        

        

        <div class="site-footer gt-c-content-color-first">
    <div class="slogan gt-c-content-color-first">事实不以人的意志为转移</div>
    <div class="social-container">
        
            
                <a href="#" target="_blank">
                    <i class="fab fa-github gt-c-content-color-first"></i>
                </a>
            
        
            
                <a href="#" target="_blank">
                    <i class="fab fa-telegram gt-c-content-color-first"></i>
                </a>
            
        
            
                <a href="#" target="_blank">
                    <i class="fab fa-qq gt-c-content-color-first"></i>
                </a>
            
        
            
                <a href="#" target="_blank">
                    <i class="fab fa-bilibili gt-c-content-color-first"></i>
                </a>
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
    </div>
    <div class="footer-info">
        Copyright&ensp;&copy;&ensp;絷缘的博客<br/><a href="https://beian.miit.gov.cn/" target="_blank">晋ICP备20001723号-1</a>
    </div>
    <div>
        Theme by <a href="https://imhanjie.com/" target="_blank">imhanjie</a>, Powered by <a
                href="https://github.com/getgridea/gridea" target="_blank">Gridea | <a href="https://zydnc.gitee.io/atom.xml" target="_blank">RSS</a></a>
    </div>
</div>

<script>
  hljs.initHighlightingOnLoad()
</script>

    </div>
</div>
</body>
</html>
